# encoding: UTF-8
 
class Admin::BugsController < ApplicationController

  def index
    @bugs = Bug.all
    set_seo_meta 'BUG反馈列表'

  end

  def edit
    @bug = Bug.find(params[:id]) 
    set_seo_meta 'BUG修复'
  end

  def update
    @bug = Bug.find(params[:id])
    if @bug.update_attributes!(params[:bug])
      redirect_to bugs_path, notice:'提交成功'
    else
      redirect_referrer_or_defautl default
    end
  end

end
